
configure_file(
  ${CMAKE_CURRENT_SOURCE_DIR}/lldb-with-tools.in
  ${CMAKE_CURRENT_BINARY_DIR}/lldb-with-tools
  @ONLY)

file(COPY ${CMAKE_CURRENT_BINARY_DIR}/lldb-with-tools
  DESTINATION "${SWIFT_RUNTIME_OUTPUT_INTDIR}"
  FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
  GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)

if (LLDB_ENABLE)
  configure_file(
    ${CMAKE_CURRENT_SOURCE_DIR}/lldb-check-expect.in
    ${CMAKE_CURRENT_BINARY_DIR}/lldb-check-expect
    @ONLY)

  file(COPY ${CMAKE_CURRENT_BINARY_DIR}/lldb-check-expect
    DESTINATION "${SWIFT_RUNTIME_OUTPUT_INTDIR}"
    FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
    GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
endif()
